<template>
	<view class="content">
		<view class="success-plate-box">
			<view class="success-icon-box">
				<image src="/pageMember/static/icon4.png" mode=""></image>
				<text>{{ desc.title }}</text>
			</view>
			<text>{{ desc.desc }}</text>
		</view>
		<block v-if="status == 1">
			<view class="bottom-but-box" @click="navTo('/pageMember/orderList/hallOrderList')">
				<text>查看订单</text>
			</view>
			<view class="bottom-but-box c" @click="navTo('/pageIndex/integralZone/integralZone')">
				<text>查看更多</text>
			</view>
		</block>
		<view v-if="status == 2 || status == 3" class="bottom-but-box" @click="navBack">
			<text>返回</text>
		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return {
				status: 1,
				hashObj: {
					1: {
						title: '兑换成功',
						desc: '兑换积分商品成功',
					},
					2: {
						title: '评价成功',
						desc: '恭喜你! 评价成功',
					},
					3: {
						title: '申请成功',
						desc: '您的退款/售后申请已提交，请耐心等待',
					},
				},
			}
		},
		computed: {
			desc: function () {
				const { status, hashObj } = this
				return hashObj[status]
			},
		},
		onLoad(option) {
			const { status } = option
			this.status = status || 1
		},
		methods:{
			navTo: function (url) {
				uni.redirectTo({ url })
			},
			navBack: function () {
				uni.navigateBack({
					delta: 1
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.content{
		width: 100%;
		height: 100vh;
		font-family: Microsoft YaHei;
		font-weight: bold;
		color: #333333;
		box-sizing: border-box;
		.success-plate-box{
			padding: 200rpx 50rpx;
			padding-bottom: 400rpx;
			font-size: 28rpx;
			font-weight: 400;
			text-align: center;
			.success-icon-box{
				display: flex;flex-direction: column;
				justify-content: center;
				align-items: center;
				font-size: 38rpx;
				margin-bottom: 20rpx;
				image{width: 120rpx;height: 120rpx;margin-bottom: 20rpx;}
			}
		}
		.bottom-but-box{
			width: 40%;
			margin: auto;
			margin-bottom: 50rpx;
			padding: 25rpx 0;
			border-radius: 50rpx;
			background: #000;
			text-align: center;font-size: 30rpx;font-weight: 400;
			color: #FFFFFF;
		}
		.c{
			background: none !important;
			border: 1rpx solid #000 !important;
			color: #000 !important;
		}
	}
</style>